Skip to content

Refreshable View with named parameters in function throws error #216

@rabenhorst

Description

@rabenhorst

When trying to parse a refreshable view with named parameters in a function an error like expected the last token kind is: ), but got = is thrown.

This test with valid SQL shows how to reproduce:

func TestParser_RefreshableViewWithFunctionWithNamedParameters(t *testing.T) {
	sql := `CREATE MATERIALIZED VIEW database_name.view_name
		REFRESH EVERY 5 MINUTE TO database_name.table_name AS
		SELECT * FROM gcs(gcs_creds,url='https://storage.googleapis.com/some-bucket/some-path/');
		`
	parser := NewParser(sql)
	_, err := parser.ParseStmts()
	require.NoError(t, err)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions